﻿package com.pandemicode.framework.smtp.mailer.parts {
	import com.pandemicode.framework.smtp.mailer.Mailer;
	
	/**
	* @author Mike Lawrence
	*/
	public class HTML {
		private var _text:String;
		private var _charset:String;
		
		public function HTML(text:String, charset:String = "UTF-8") {
			this._text = text;
			this._charset = charset;
		}
		
		public function toString():String {
			var c:String = "Content-Type: text/html; charset=\"" + this._charset + "\"; format=flowed" + Mailer.NEWLINE;
			c += "Content-Transfer-Encoding: 8bit" + Mailer.NEWLINE;
			c += Mailer.NEWLINE;
			c += this._text + Mailer.NEWLINE;
			return c;
		}
	}
}
